import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        int number = countPrimes(n);
        System.out.println(number);
    }

    public static int countPrimes(int n) {
        //超出时间限制
        int sum = 0;
        for (int i = 2; i < n; i++) {
            boolean flag = true;
            for (int j = 2; j <= Math.sqrt(i); j++) {
                if (i % j == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                sum++;
            }
        }
        return sum;
    }
}
